'''
Author: cw
Date: 2025-08-18
Description: ...
'''
from sqlalchemy import select

from utils import db_util
from models.mysql_model import Apps


async def get_info_by_appid(appid: str):
    """info"""
    condition = [
        Apps.appid == appid,
        Apps.is_deleted == 0
    ]
    async with db_util.session_context() as session:
        cursor = (await session.execute(
            select(
                Apps
            ).filter(
                *condition
            )
        )).scalar()
        return cursor.to_dict() if cursor else None
